function [shape] = poly_move(varargin)
%% Poly Rotate 2
%       Move a given polygon in 2D space.
%
%       poly_rotate2(shape,x,y) - Move the given shape in 2d space by x and
%       y. 

%% Check argument list
if nargin~=3
    error('>>> Useage poly_rotate(shape,x,y)');
    % RETURN
end

%%
% Determine if shape is a legit x,y matrix
if size(varargin{1},2) ~= 2
    error('>>> Shape must be of size [n,2]')
    % RETURN
end

if sum(sum(size(varargin{2}))) ~= 2
    error('>>> X must be a single scaler value')
end


if sum(sum(size(varargin{3}))) ~= 2
    error('>>> Y must be a single scaler value')
end



%% Set variables
shape = varargin{1};
x = varargin{2};
y = varargin{3};

%% Move X cords
shape(:,1)=shape(:,1)+x;

%% Move Y cords
shape(:,2)=shape(:,2)+y;

end